<template>
  <div>
    <keep-alive include="find,shareList,question">
      <router-view></router-view>
    </keep-alive>
    <!-- 导航菜单 -->
    <van-tabbar
      :route="true"
      v-model="active"
      active-color="#E40137"
      inactive-color="#B4B4BD"
      class="home"
      placeholder
      v-if="$route.meta.needTab"
    >
      <!-- 公司 -->
      <van-tabbar-item to="/home/company">
        <span>公司</span>
        <template #icon>
          <i class="iconfont">&#xe63b;</i>
        </template>
      </van-tabbar-item>
      <!-- 刷题 -->
      <van-tabbar-item to="/home/question">
        <span>刷题</span>
        <template #icon>
          <i class="iconfont">&#xe63f;</i>
        </template>
      </van-tabbar-item>
      <!-- 发现 -->
      <van-tabbar-item to="/home/find">
        <span>发现</span>
        <template #icon>
          <i class="iconfont">&#xe646;</i>
        </template>
      </van-tabbar-item>
      <!-- 我的 -->
      <van-tabbar-item to="/home/user">
        <span>我的</span>
        <template #icon>
          <i class="iconfont">&#xe645;</i>
        </template>
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
export default {
  data () {
    return {
      active: 'search'
    }
  }
}
</script>

<style lang="less" scoped></style>
